package com.study.sbsummary.config.constant;

import com.alibaba.fastjson.JSONObject;

import java.time.format.DateTimeFormatter;
import java.util.Arrays;
import java.util.List;

public final class Constants {

    //plog常量
    public static final String USER_LOGIN = "用户登录失败";
    public static final String FIVE_TYPE = "five_type类型错误";
    public static final String PUBLISH_NUM_MAX = "今日发布数量已达上限";

    //文章图片信息标识
    public static final String IMAGES_TYPE = "duanneirong";

    public static final String YIDIAN_LOCAL_APPID = "localside";

    public static final int PUBLISH_FAILED = 2; //发文失败

    /**
     * 不需要推荐的好友数量
     */
    public static final int NOT_RECOMMEND_FRIENDS_COUNT = 15;

    /**
     * 每日最大发文数
     */
    public static final int MAX_PUSH_DOC_COUNT = 20;

    /**
     * 最多好友数
     */
    public static final int MAX_FRIENDS_COUNT = 50;

    public static final String[] NEWS_DETAILS_FIELDS = {
            "_id", "uuid", "date", "dsource", "source", "from", "appid", "author", "summary", "parse_title", "text_content", "csubtype",
            "clean_content", "url", "parse_content", "ctype", "ncat_class", "ncat_score", "nsubcat_class", "nsubcat_score",
            "image_urls", "removed_images", "image", "upload_images", "img_scores_json", "writer_location", "latitude", "longitude",
            "enable_top", "removed", "scope", "update_time", "local_cat", "local_subcat", "local_cat_score", "local_subcat_score",
            "s_ntag", "keywords", "like_count", "comment_count", "comment_like",
            "free_marker", "i_alliance_scope", "image_meta", "wm_id", "recommend", "artificial_score", "post_city_id", "post_poi_id", "music_id", "upload_images", "upload_img_scores_json",
            "img_scores_json",
            "collection_id", "tags_yd"
    };

    public static final String[] VIDEO_DETAILS_FIELDS = {"_id", "uuid", "date", "dsource", "source", "from", "appid", "author", "summary", "parse_title", "text_content",
            "clean_content", "url", "parse_content", "ctype", "ncat_class", "ncat_score", "nsubcat_class", "nsubcat_score",
            "image_urls", "removed_images", "image", "upload_images", "writer_location", "latitude", "longitude", "enable_top", "removed",
            "scope", "update_time", "local_cat", "local_subcat", "local_cat_score", "local_subcat_score", "s_ntag", "keywords",
            "v_height", "v_width", "video_ids", "duration", "video_url", "video_urls", "video_h265_urls", "vtags", "tags_yd", "micro_vtags",
            "like_count", "comment_count", "comment_like", "free_marker", "i_alliance_scope",
            "image_meta", "wm_id", "recommend", "artificial_score", "upload_img_scores_json", "video_size",
            "video_id", "tags_yd", "collection_id"
    };


    //信息流视频
    public static final String DOCUMENT_TYPE_VIDEO = "video";
    public static final String DOCUMENT_TYPE_VIDEO_LIVE = "video_live";

    //服务降级相关
    public static final String CODIS_CLUSTER_UNIVERSAL = "universal";

    public static final int PUBLISH_EXPIRE_TIME = 60 * 15; //发文唯一key的过期时间，是15分钟
    public static final int PUBLISH_MAX_TIME = 8; //发文的超时时间，最高是8s

    public static final String IMAGE_COUNT_ERROR = "图片数量错误";
    public static final String IMAGE_URLS_ILLEGAL = "Image_urls illegal";

    public static final String CONTENT_EXCEED_BOUND = "发表内容字数超出限制";

    //返回json:{}
    public static final JSONObject RESPONSE_RESULT_EMPTY = new JSONObject();

    public static final String PUBLISH_EXCEPTION = "服务器忙,请稍后再试";

    public static final String GET_SUCCESS_MSG = "获取成功";
    public static final String ERROR_CODE_BLOCK_USER_BEBLOCK = "已被拉黑，权限不足";


    //新审核token
    //身边-图文曝光
    public static final int AUDIT_BUSINESS_ID_DOC = 2;
    public static final int AUDIT_BUSINESS_UNITID_DOC = 2002;
    public static final String AUDIT_TOKEN_DOC = "1c01a695d0756562639ad75c7f8bf6a7";
    //身边-视频曝光
    public static final String AUDIT_BUSINESS_ID_VIDEO = "2";
    public static final String AUDIT_BUSINESS_UNITID_VIDEO = "200601";
    public static final String AUDIT_TOKEN_VIDEO = "e0a860910cc2bde9a188ea44872ddbc5";

    //用户好友信息

    //评论
    public static final Integer BUSINESS_ID = 1002;
    public static final Integer YIDIAN_LOCAL_APP_SRC = 157;
    public static final String SUCCESS = "success";
    //define('MIDDLE_SERVICE_NEW_DOMAIN', 'http://10.126.154.119:8093'); //评论查询测试地址
    //    define('MIDDLE_PRODUCT_NEW_DOMAIN', 'http://10.126.154.119:18080'); //评论生产测试地址
    public static final String MIDDLE_SERVICE_NEW_DOMAIN = "http://10.126.154.119:8093";
    public static final String MIDDLE_GET_COMMENT_ZL_DETAIL = MIDDLE_SERVICE_NEW_DOMAIN + "/comment/getCommentsAscByDocId";

    public static final List<String> USERINFO_FIELD_S = Arrays.asList("nickname", "profile");
    public static final List<String> USERINFO_FIELD_B = Arrays.asList("nickname", "profile", "userid", "destory", "complete_information_time");
    public static final String ACCOUNT_STATUS_CLOSE = "ACCOUNT_STATUS_CLOSE"; //封禁
    public static final String ACCOUNT_STATUS_FROZEN = "ACCOUNT_STATUS_FROZEN"; //冻结
    public static final String ACCOUNT_STATUS_BANNED = "ACCOUNT_STATUS_BANNED"; //禁言

    public static DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");

    public static final int REMOVE_USER_PLOG_LIMIT = 1500;
    public static final int ADD_USER_PLOG_LIMIT = 1000;

    public static final String MUSIC_TARGET = "http://ks3-cn-beijing.ksyun.com/shenbian-yidian";
    public static final String MUSIC_REPLACEMENT = "https://shenbian-yidian.go2yd.com";

    public static final String PUBLISH_DOC_SUCCESS = "publish_doc_success";

    public static final String PUBLISH_DOC_FAILURE = "publish_doc_failure";
}
